package com.wjc.train.batch.config;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.Environment;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author Guessed
 */
@Slf4j
@SpringBootApplication
@ComponentScan(basePackages ="com.wjc")
@EnableTransactionManagement
@EnableDiscoveryClient
@EnableFeignClients("com.wjc.train.*.feign")
@MapperScan("com.wjc.train.*.mapper")
public class BatchApplication {
    public static void main(String[] args) {
        SpringApplication app = new SpringApplication(BatchApplication.class);
        Environment env = app.run(args).getEnvironment();
        log.info("启动成功!");
        log.info("地址: http://127.0.0.1:{}",env.getProperty("server.port"));
    }
}
